var obj1 = { name: "Tom" };
var obj2 = obj1;

function fn(obj) {
  obj = { name: "xxx" };
}

fn(obj1); // obj = obj1, obj = {}
console.log(obj1.name);
